package com.pond.pond.mapper;

import com.pond.pond.domain.Appointment;
import com.pond.pond.domain.AppointmentTimeSegment;
import feign.Param;

import java.util.List;
import java.util.Map;

/**
 * 钓位信息Mapper接口
 * 
 * @author ruoyi
 * @date 2025-06-09
 */
public interface AppointmentMapper 
{
    /**
     * 查询钓位信息
     * 
     * @param id 钓位信息主键
     * @return 钓位信息
     */
    public Appointment selectAppointmentById(Long id);

    /**
     * 查询钓位信息列表
     * 
     * @param Appointment 钓位信息
     * @return 钓位信息集合
     */
    public List<Appointment> selectAppointmentList(Appointment Appointment);

    List<AppointmentTimeSegment> selectSegmentsByAppointmentIds(@Param("appointmentIds") List<Long> appointmentIds);

    /**
     * 新增钓位信息
     * 
     * @param Appointment 钓位信息
     * @return 结果
     */
    public int insertAppointment(Appointment Appointment);

    /**
     * 批量新增钓位信息
     *
     * @param list 钓位信息
     * @return 结果
     */
    int insertTimeSegment(@Param("list") List<AppointmentTimeSegment> list);


    /**
     * 修改钓位信息
     * 
     * @param Appointment 钓位信息
     * @return 结果
     */
    public int updateAppointment(Appointment Appointment);

    /**
     * 删除钓位信息
     * 
     * @param id 钓位信息主键
     * @return 结果
     */
    public int deleteAppointmentById(Long id);

    public  int deleteTimeSegmentsByAppointmentId(Long id);
    /**
     * 批量删除钓位信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAppointmentByIds(Long[] ids);

    /**
     * 当前登录用户的预约信息
     *
     * @param userId 用户id
     * @return 结果
     */
    List<Appointment> selectAppointmentByUserId(Long userId);

    int setInsideStatus(Long id);

    int setStatus(Map<String, Object> params);
}
